<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
	<%@ taglib uri="/struts-tags" prefix="s"%>
    <title>My JSP 'listProductType.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
  <script src="/resource/js/jquery.validate.js" type="text/javascript"></script>
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>
  
  <body>
    <h1>产品类型</h1> <br>
    <table  border="2">
   <tr>
     <th>id</th>
     <th>name</th>
     <th colspan="2">operation</th>
   </tr>
    <s:iterator value="#listproductType" status="st">
        <tr>
            <td>${ptid}</td>
            <!-- <td><a href="user/info.action?id=${id }&adminId=0">${name } </a></td> -->
            <td><a href="productType/listProducts.action?ptid=${ptid}">${ptname}</a></td>
            <td><a href="productType/manageProductType.action?ptid=${ptid}">编辑</a></td>
            <td><a href="productType/delProductType.action?ptid=${ptid }">delete</a></td>
        </tr>
    </s:iterator>
</table>
<br/>
    <form action="productType/addProductType.action" method="post">
    	<label>输入产品类型名称：</label>
    	<input type="text" name="ptname" required="true" />
    	<button type="submit">添加产品类型</button>
    </form>
    
    <br/ ><br/ >
    <a href="http://localhost:8080/Pos43/">回到主页</a>
  </body>
</html>
